]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
mpris: Use player Identity if the player app isn't known
authorJulian Sparber <julian@sparber.net>
Fri, 26 Jan 2024 15:44:29 +0000 (16:44 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 30 Jan 2024 17:05:23 +0000 (17:05 +0000)
For players that don't match to an app, we can still do better than
the generic fallback if the client provides a valid `Identity` value.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>

data/dbus-interfaces/org.mpris.MediaPlayer2.xml
js/ui/mpris.js

index 5febaf90bdcec9c37cb15880210868bfe89b0f2d..6c248bfc1354989823f3a8eafec679161dc5028e 100644 (file)
@@ -3,5 +3,6 @@
     <method name="Raise"/>
     <property name="CanRaise" type="b" access="read"/>
     <property name="DesktopEntry" type="s" access="read"/>
+    <property name="Identity" type="s" access="read"/>
   </interface>
 </node>
index 78b61f4cf9ddf6cf4ea12b0a48ef64ce81e94b20..80b6af8fa2269da257734109e80b297a524c8b80 100644 (file)
@@ -227,7 +227,7 @@ export class MprisPlayer extends Signals.EventEmitter {
         }
 
         this.source.set({
-            title: this._app?.get_name() ?? null,
+            title: this._app?.get_name() ?? this._mprisProxy.Identity,
             icon: this._app?.get_icon() ?? null,
         });